var fn_index = async (ctx, next) => {
    ctx.render('index.html', {
        title: 'Welcome'
    });
};

var fn_signin = async (ctx, next) => {
    var
        email = ctx.query.email || '',
        password = ctx.query.password || '';
    if (email === '919792828@qq.com' && password === '123456') {
        console.log("成功");

        // 登录成功:
        ctx.render('loginOk.html', {
            title: '登陆成功',
            name: email
        });
    } else {
        console.log("失败");
        // 登录失败:
        ctx.render('loginFail.html', {
            title: '登陆失败了'
        });
    }
};

module.exports = {
    'GET /': fn_index,
    'GET /signin': fn_signin
};

